package com.group.three.service.Impl;

import com.github.pagehelper.PageHelper;
import com.group.three.entity.AfterSale;
import com.group.three.mapper.AfterSaleMapper;
import com.group.three.service.AfterSaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AfterSaleServiceImpl implements AfterSaleService {
    @Autowired
    private AfterSaleMapper afterSaleMapper;

    @Override
    public List<AfterSale> getAfterSalePages(String storeId, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return afterSaleMapper.getAfterSalePages(storeId, pageNum, pageSize);
    }

    @Override
    public int review(String afterSaleSn, String serviceStatus, String remark, Double actualRefundPrice) {
        return afterSaleMapper.review(afterSaleSn, serviceStatus, remark, actualRefundPrice);
    }

    @Override
    public int storeConfirm(String afterSaleSn, String serviceStatus, String remark) {
        return afterSaleMapper.storeConfirm(afterSaleSn, serviceStatus, remark);
    }

    @Override
    public int changeLogistics(String afterSaleSn, String changeStatus, String logisticsSn, String logisticsCompany) {
        return afterSaleMapper.changeLogistics(afterSaleSn, changeStatus, logisticsSn, logisticsCompany);
    }
}
